import Vue from 'vue';

export namespace N_drivingSet {
  export interface setInfo {
    label?: string;
    code: string;
    value: number | boolean;
  }

  export interface craneParams {
    id: number;
    // 实工位
    actualStation: setInfo;
    // 预工位
    preStation: setInfo;
    // 工件号
    workpiece: setInfo;
    // 目标位
    targetPosition: setInfo;
    // 挂组ID
    groupId: setInfo;
  }

  export interface ControlState {
    type: string;
    label: string;
    btnType: string;
    loading: boolean;
    code: string;
  }

  export interface HookState {
    type: string;
    label: string;
    icon: string;
    active: boolean;
    code: string;
  }

  export interface TiltParams {
    id: number;
    rise: {
      slowToFastTime: setInfo;
      slowKeepTime: setInfo;
      angle: setInfo;
      startPosition: setInfo;
    };
    fall: {
      fastHoldTime: setInfo;
    };
  }

  export interface colData {
    col0: setInfo;
    col1: setInfo;
    col2: setInfo;
    col3: setInfo;
    col4: setInfo;
    col5: setInfo;
    col6: setInfo;
    col7: setInfo;
  }

  export interface PriorityParams {
    data: colData[];
  }

  export interface OperationParams {
    preLiftTime: setInfo;
    rectifierLiftDelay: setInfo;
    allowExchangeLimit: setInfo;
  }

  export interface AdvancedCraneParams {
    useCardReader: setInfo;
    specialMaterialValid?: setInfo;
    codeReadStation: setInfo;
    liftSlow: setInfo;
    liftFast: setInfo;
    positionDelay: setInfo;
    countDetectDelay?: setInfo;
  }

  export interface AdvancedSettings {
    priority: {
      crane1: PriorityParams;
      crane2: PriorityParams;
    };
    operation: OperationParams;
    advanced: {
      crane1: AdvancedCraneParams;
      crane2: AdvancedCraneParams;
    };
  }

  export interface cDrivingSet extends Vue {
    updateData: () => void;
  }
}
